home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_procmail.idb / usr / freeware / catman / u_man / cat1 / procmail.Z / procmail
Encoding:
Text File  |  1998-10-28  |  38.6 KB  |  992 lines

  1. /xlv1/freeware/1998.Oct/procmail/3.11pre7/procmail-3.11pre7.diffbuild/new
  2.  
  3.  
  4.  
  5.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  6.  
  7.  
  8.  
  9.      NNNNAAAAMMMMEEEE
  10.       procmail - autonomous    mail processor
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       pppprrrrooooccccmmmmaaaaiiiillll [----ppppttttooooYYYY] [----ffff _f_r_o_m_w_h_o_m]
  14.            [_p_a_r_a_m_e_t_e_r====_v_a_l_u_e    | _r_c_f_i_l_e] ...
  15.       pppprrrrooooccccmmmmaaaaiiiillll [----ttttooooYYYY] [----ffff _f_r_o_m_w_h_o_m]    [----aaaa _a_r_g_u_m_e_n_t]
  16.            ----dddd _r_e_c_i_p_i_e_n_t ...
  17.       pppprrrrooooccccmmmmaaaaiiiillll [----ppppttttYYYY] ----mmmm [_p_a_r_a_m_e_t_e_r====_v_a_l_u_e] ...  _r_c_f_i_l_e
  18.            [_a_r_g_u_m_e_n_t] ...
  19.       pppprrrrooooccccmmmmaaaaiiiillll ----vvvv
  20.  
  21.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.       For a    quick start, see NNNNOOOOTTTTEEEESSSS at the end.
  23.  
  24.       PPPPrrrrooooccccmmmmaaaaiiiillll should be invoked automatically over     the  ....ffffoooorrrrwwwwaaaarrrrdddd
  25.       file mechanism as soon as mail arrives.  Alternatively, when
  26.       installed by a system    administrator, it can be invoked  from
  27.       within  the mailer immediately.  When    invoked, it first sets
  28.       some environment variables to    default    values,    reads the mail
  29.       message from stdin until an EOF, separates the body from the
  30.       header, and then, if no command line arguments are  present,
  31.       it  starts  to  look    for  a    file  named $$$$HHHHOOOOMMMMEEEE////....pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc.
  32.       According to the processing recipes in this file,  the  mail
  33.       message  that     just  arrived gets distributed    into the right
  34.       folder (and more).  If no rcfile is found, or    processing  of
  35.       the  rcfile  falls off the end, procmail will    store the mail
  36.       in the default system    mailbox.
  37.  
  38.       If no    rcfiles    and no ----pppp have been specified on  the  command
  39.       line,     procmail  will,  prior     to reading $HOME/.procmailrc,
  40.       interpret              commands              from
  41.       ////uuuussssrrrr////ffffrrrreeeeeeeewwwwaaaarrrreeee////lllliiiibbbb////pppprrrrooooccccmmmmaaaaiiiillll////pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc     (if  present).      Care
  42.       must           be      taken        when          creating
  43.       /usr/freeware/lib/procmail/procmailrc,      because,        if
  44.       circumstances     permit,  it  will  be    executed   with      root
  45.       privileges   (contrary  to  the  $HOME/.procmailrc  file  of
  46.       course).
  47.  
  48.       If running suid root or with root privileges,    procmail  will
  49.       be  able  to    perform     as a functionally enhanced, backwards
  50.       compatible mail delivery agent.
  51.  
  52.       Procmail can also be used as a general purpose mail  filter,
  53.       i.e.    provisions  have  been    made  to enable    procmail to be
  54.       invoked in a special sendmail    rule.
  55.  
  56.       The  rcfile  format  is   described    in   detail   in   the
  57.       pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc(5)    man page.
  58.  
  59.       The weighted scoring technique is described in detail    in the
  60.       pppprrrrooooccccmmmmaaaaiiiillllsssscccc(5)    man page.
  61.  
  62.  
  63.  
  64.      Page 1                         (printed 8/25/98)
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  72.  
  73.  
  74.  
  75.       Examples  for     rcfile     recipes  can  be  looked  up  in  the
  76.       pppprrrrooooccccmmmmaaaaiiiilllleeeexxxx(5)    man page.
  77.  
  78.     SSSSiiiiggggnnnnaaaallllssss
  79.       TTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE   Terminate    prematurely and    requeue    the mail.
  80.  
  81.       HHHHAAAANNNNGGGGUUUUPPPP      Terminate    prematurely and    bounce the mail.
  82.  
  83.       IIIINNNNTTTTEEEERRRRRRRRUUUUPPPPTTTT   Terminate    prematurely and    bounce the mail.
  84.  
  85.       QQQQUUUUIIIITTTT          Terminate     prematurely  and  silently  lose  the
  86.               mail.
  87.  
  88.       AAAALLLLAAAARRRRMMMM          Force a timeout (see TTTTIIIIMMMMEEEEOOOOUUUUTTTT))))....
  89.  
  90.       UUUUSSSSRRRR1111          Equivalent to a VVVVEEEERRRRBBBBOOOOSSSSEEEE=off.
  91.  
  92.       UUUUSSSSRRRR2222          Equivalent to a VVVVEEEERRRRBBBBOOOOSSSSEEEE=on.
  93.  
  94.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  95.       ----vvvv   Procmail    will print its    version     number,  display  its
  96.            compile time configuration and exit.
  97.  
  98.       ----pppp   Preserve    any old    environment.  Normally procmail    clears
  99.            the  environment     upon startup, except for the value of
  100.            TZ and LANG.  However, in any case: any default    values
  101.            will  override  any  preexisting    environment variables,
  102.            i.e.  procmail  will  not  pay  any  attention  to  any
  103.            predefined   environment     variables,  it     will  happily
  104.            overwrite them with its own defaults.  For the list  of
  105.            environment variables that procmail will    preset see the
  106.            pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc(5)  man  page.   If  both  -p     and  -m   are
  107.            specified,  the    list  of  preset environment variables
  108.            shrinks to just:     LOGNAME,  HOME,  SHELL,  ORGMAIL  and
  109.            MAILDIR.
  110.  
  111.       ----tttt   Make procmail fail  softly,  i.e.  if  procmail    cannot
  112.            deliver    the  mail to any of the    destinations you gave,
  113.            the mail    will  not  bounce,  but     will  return  to  the
  114.            mailqueue.   Another  delivery-attempt  will be made at
  115.            some time in the    future.
  116.  
  117.       ----ffff _f_r_o_m_w_h_o_m
  118.            Causes procmail to regenerate the leading `From '  line
  119.            with  _f_r_o_m_w_h_o_m  as  the sender (instead of -f one could
  120.            use  the     alternate  and     obsolete  -r).      If  _f_r_o_m_w_h_o_m
  121.            consists     merely     of  a    single `-', then procmail will
  122.            only update the timestamp  on  the  `From  '  line  (if
  123.            present,    if not,    it will    generate a new one).
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.      Page 2                         (printed 8/25/98)
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  138.  
  139.  
  140.  
  141.       ----oooo   Instead of allowing anyone to generate `From  '    lines,
  142.            simply override the fakes.
  143.  
  144.       ----YYYY   Assume traditional Berkeley mailbox format, ignore  any
  145.            CCCCoooonnnntttteeeennnntttt----LLLLeeeennnnggggtttthhhh:::: fields.
  146.  
  147.       ----aaaa _a_r_g_u_m_e_n_t
  148.            This will set $1    to be equal to _a_r_g_u_m_e_n_t.   It  can  be
  149.            used  to    pass meta information along to procmail.  This
  150.            is typically done by passing along the $@x  information
  151.            from the    sendmail mailer    rule.
  152.  
  153.       ----dddd _r_e_c_i_p_i_e_n_t ...
  154.            This turns on explicit delivery mode, delivery will  be
  155.            to  the local user _r_e_c_i_p_i_e_n_t.  This, of course, only is
  156.            possible     if  procmail  has  root  privileges  (or   if
  157.            procmail     is  already running with the recipient's euid
  158.            and  egid).   Procmail  will  setuid  to     the  intended
  159.            recipients  and delivers    the mail as if it were invoked
  160.            by the recipient    with no    arguments (i.e.    if  no    rcfile
  161.            is found, delivery is like ordinary mail).  This    option
  162.            is incompatible with ----pppp.
  163.  
  164.       ----mmmm   Turns procmail into a general purpose mail filter.   In
  165.            this  mode  one rcfile must be specified    on the command
  166.            line.   After  the  rcfile,  procmail  will  accept  an
  167.            unlimited  number  of  arguments.   If the rcfile is an
  168.            absolute         path           starting          with
  169.            ////uuuussssrrrr////ffffrrrreeeeeeeewwwwaaaarrrreeee////lllliiiibbbb////pppprrrrooooccccmmmmaaaaiiiillll////pppprrrrooooccccmmmmaaaaiiiillllrrrrccccssss////           without
  170.            backward    references (i.e. the parent  directory    cannot
  171.            be  mentioned)  procmail     will,    only  if  no  security
  172.            violations are found, take on the identity of the owner
  173.            of  the    rcfile    (or symbolic link).  For some advanced
  174.            usage of    this option you    should look  in     the  EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  175.            section below.
  176.  
  177.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  178.       Any  arguments  containing  an  '='  are  considered    to  be
  179.       environment variable assignments, they will _a_l_l be evaluated
  180.       after    the default values have    been assigned and  before  the
  181.       first    rcfile is opened.
  182.  
  183.       Any other arguments are presumed to be rcfile    paths  (either
  184.       absolute, or if they start with `./' relative    to the current
  185.       directory; aaaannnnyyyy ooootttthhhheeeerrrr rrrreeeellllaaaattttiiiivvvveeee    path  is  relative  to    $HOME,
  186.       unless  the  ----mmmm  option  has    been  given, in    which case all
  187.       relative paths  are  relative     to  the  current  directory);
  188.       procmail  will  start     with  the  first  one it finds    on the
  189.       command line.     The following ones will only be parsed    if the
  190.       preceding  ones have a not matching HOST-directive entry, or
  191.       in case they should not exist.
  192.  
  193.  
  194.  
  195.  
  196.      Page 3                         (printed 8/25/98)
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  204.  
  205.  
  206.  
  207.       If no    rcfiles    are specified, it looks    for $$$$HHHHOOOOMMMMEEEE////....pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc.
  208.       If  not  even     that  can  be found, processing will continue
  209.       according  to     the  default  settings     of  the   environment
  210.       variables and    the ones specified on the command line.
  211.  
  212.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  213.       Examples  for     rcfile     recipes  can  be  looked  up  in  the
  214.       pppprrrrooooccccmmmmaaaaiiiilllleeeexxxx(5)     man page.  A small sample rcfile can be found
  215.       in the NNNNOOOOTTTTEEEESSSS section below.
  216.  
  217.       Skip the rest    of this    EXAMPLES  section  unless  you    are  a
  218.       system   administrator   who     is   vaguely    familiar  with
  219.       sendmail.cf syntax.
  220.  
  221.       The ----mmmm option    is typically used when procmail    is called from
  222.       within  a rule in the    sendmail.cf file.  In order to be able
  223.       to do    this it    is convenient to create     an  extra  `procmail'
  224.       mailer  in your sendmail.cf file (in addition    to the perhaps
  225.       already present `local' mailer that starts up    procmail).  To
  226.       create such a    `procmail' mailer I'd suggest something    like:
  227.  
  228.            Mprocmail, P=/usr/freeware/bin/procmail,    F=mSDFMhun, S=11, R=21,
  229.                A=procmail -m $h    $g $u
  230.  
  231.       This enables you to  use  rules  like     the  following     (most
  232.       likely  in  ruleset  0)  to filter mail through the procmail
  233.       mailer (please note the leading tab to  continue  the     rule,
  234.       and the tab to separate the comments):
  235.  
  236.            R$*<@some.where>$*
  237.                $#procmail $@/etc/procmailrcs/some.rc $:$1@some.where.procmail$2
  238.            R$*<@$*.procmail>$*
  239.                $1<@$2>$3       Already filtered, map back
  240.  
  241.       And /etc/procmailrcs/some.rc could be    as simple as:
  242.  
  243.            :0                   # sink all junk mail
  244.            * ^Subject:.*junk
  245.            /dev/null
  246.  
  247.            :0                   # pass along all    other mail
  248.            ! -oi -f    "$@"
  249.  
  250.       Do  watch  out   when      sending   mail   from      within   the
  251.       /etc/procmailrcs/some.rc file, if you    send mail to addresses
  252.       which    match the first    rule again, you    could be  creating  an
  253.       endless mail loop.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.      Page 4                         (printed 8/25/98)
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  270.  
  271.  
  272.  
  273.      FFFFIIIILLLLEEEESSSS
  274.       ////eeeettttcccc////ppppaaaasssssssswwwwdddd         to set    the recipient's    LOGNAME,  HOME
  275.                  and SHELL variable defaults
  276.  
  277.       ////vvvvaaaarrrr////mmmmaaaaiiiillll////$$$$LLLLOOOOGGGGNNNNAAAAMMMMEEEE     system     mailbox;  both      the    system
  278.                  mailbox  and  the immediate directory
  279.                  it is in will    be  created  everytime
  280.                  procmail starts and either one    is not
  281.                  present
  282.  
  283.       ////uuuussssrrrr////ffffrrrreeeeeeeewwwwaaaarrrreeee////lllliiiibbbb////pppprrrrooooccccmmmmaaaaiiiillll////pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc
  284.                  initial global    rcfile
  285.  
  286.       ////uuuussssrrrr////ffffrrrreeeeeeeewwwwaaaarrrreeee////lllliiiibbbb////pppprrrrooooccccmmmmaaaaiiiillll////pppprrrrooooccccmmmmaaaaiiiillllrrrrccccssss////
  287.                  special privileges path for rcfiles
  288.  
  289.       $$$$HHHHOOOOMMMMEEEE////....pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc     default rcfile
  290.  
  291.       ////vvvvaaaarrrr////mmmmaaaaiiiillll////$$$$LLLLOOOOGGGGNNNNAAAAMMMMEEEE....lllloooocccckkkk
  292.                  lockfile for the system mailbox  (not
  293.                  automatically     used    by   procmail,
  294.                  unless           $DEFAULT        equals
  295.                  /var/mail/$LOGNAME  and  procmail  is
  296.                  delivering to $DEFAULT)
  297.  
  298.       ////uuuussssrrrr////lllliiiibbbb////sssseeeennnnddddmmmmaaaaiiiillll     default mail forwarder
  299.  
  300.       ____????????????????````hhhhoooossssttttnnnnaaaammmmeeee````     temporary `unique' zero-length     files
  301.                  created by procmail
  302.  
  303.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  304.       pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc(5), pppprrrrooooccccmmmmaaaaiiiillllsssscccc(5),    pppprrrrooooccccmmmmaaaaiiiilllleeeexxxx(5), sssshhhh(1), ccccsssshhhh(1),
  305.       mmmmaaaaiiiillll(1), mmmmaaaaiiiillllxxxx(1), bbbbiiiinnnnmmmmaaaaiiiillll(1), uuuuuuuuccccpppp(1), aaaalllliiiiaaaasssseeeessss(5),
  306.       sssseeeennnnddddmmmmaaaaiiiillll(8), eeeeggggrrrreeeepppp(1), ggggrrrreeeepppp(1), bbbbiiiiffffffff(1), ccccoooommmmssssaaaatttt(8),
  307.       lllloooocccckkkkffffiiiilllleeee(1), ffffoooorrrrmmmmaaaaiiiillll(1), ccccrrrroooonnnn(1)
  308.  
  309.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  310.       Autoforwarding mailbox found
  311.                  The system mailbox had     its  suid  or
  312.                  sgid  bit  set,  procmail  terminates
  313.                  with  EX_NOUSER  assuming  that  this
  314.                  mailbox must not be delivered to.
  315.  
  316.       Bad substitution of "x"
  317.                  Not a valid environment variable name
  318.                  specified.
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.      Page 5                         (printed 8/25/98)
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  336.  
  337.  
  338.  
  339.       Closing brace    unexpected
  340.                  There was  no    corresponding  opening
  341.                  brace (nesting    block).
  342.  
  343.       Conflicting options     Not all option    combinations are  use-
  344.                  ful
  345.  
  346.       Conflicting x    suppressed
  347.                  Flag x    is not    compatible  with  some
  348.                  other flag on this recipe.
  349.  
  350.       Couldn't create "x"     The system mailbox  was  missing  and
  351.                  could not/will    not be created.
  352.  
  353.       Couldn't determine implicit lockfile from "x"
  354.                  There were no `>>' redirectors    to  be
  355.                  found,    using simply `$LOCKEXT'    as lo-
  356.                  callockfile.
  357.  
  358.       Couldn't unlock "x"     Lockfile was already gone,  or     write
  359.                  permission  to    the directory were the
  360.                  lockfile is has been denied.
  361.  
  362.       Deadlock attempted on    "x"
  363.                  The locallockfile specified  on  this
  364.                  recipe     is  equal  to    a still    active
  365.                  $LOCKFILE.
  366.  
  367.       Denying special privileges for "x"
  368.                  Procmail will not take    on the identi-
  369.                  ty that comes with the    rcfile because
  370.                  a security violation was found     (e.g.
  371.                  ----pppp  or     variable  assignments    on the
  372.                  command line) or procmail had    insuf-
  373.                  ficient privileges to do so.
  374.  
  375.       Enforcing stricter permissions on "x"
  376.                  The system mailbox of    the  recipient
  377.                  was  found  to    be unsecured, procmail
  378.                  secured it.
  379.  
  380.       Error    while writing to "x"
  381.                  Nonexistent  subdirectory,  no     write
  382.                  permission, pipe died or disk full.
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.      Page 6                         (printed 8/25/98)
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  402.  
  403.  
  404.  
  405.       Exceeded LINEBUF     Buffer    overflow detected, LINEBUF was
  406.                  too small, memory might be corrupted.
  407.  
  408.       Excessive output quenched from "x"
  409.                  The program or    filter    "x"  tried  to
  410.                  produce   too    much  output  for  the
  411.                  current LINEBUF, the  rest  was  dis-
  412.                  carded.
  413.  
  414.       Extraneous x ignored     The action line of this recipe     makes
  415.                  flag x    meaningless.
  416.  
  417.       Failed forking "x"     Process table is full (and NORESRETRY
  418.                  has been exhausted).
  419.  
  420.       Failed to execute "x"     Program not in    path, or  not  execut-
  421.                  able.
  422.  
  423.       Forced unlock    denied on "x"
  424.                  No write permission in    the  directory
  425.                  where    lllloooocccckkkkffffiiiilllleeee  "x" resides, or more
  426.                  than one procmail trying to  force  a
  427.                  lock at exactly the same time.
  428.  
  429.       Forcing lock on "x"     LLLLoooocccckkkkffffiiiilllleeee "x" is going to  be  removed
  430.                  by  force  because  of    a timeout (see
  431.                  also:    LLLLOOOOCCCCKKKKTTTTIIIIMMMMEEEEOOOOUUUUTTTT).
  432.  
  433.       Incomplete recipe     The start of a    recipe was found,  but
  434.                  it stranded in    an EOF.
  435.  
  436.       Insufficient privileges
  437.                  Procmail    either    needs      root
  438.                  privileges,  or  must    have the right
  439.                  (e)uid    aaaannnndddd (e)gid to run in  delivery
  440.                  mode.    The mail will bounce.
  441.  
  442.       Invalid regexp "x"     The regular expression     "x"  contains
  443.                  errors     (most    likely some missing or
  444.                  extraneous parens).
  445.  
  446.       Kernel-lock failed     While    trying    to  use     the   kernel-
  447.                  supported  locking calls, one of them
  448.                  failed    (usually indicates an  OS  er-
  449.                  ror), procmail    ignores    this error and
  450.                  proceeds.
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.      Page 7                         (printed 8/25/98)
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  468.  
  469.  
  470.  
  471.       Kernel-unlock    failed     See above.
  472.  
  473.       Lock failure on "x"     Can only occur    if  you     specify  some
  474.                  real    weird    (and   illegal)     lock-
  475.                  filenames or if  the  lllloooocccckkkkffffiiiilllleeee     could
  476.                  not  be  created  because of insuffi-
  477.                  cient permissions or nonexistent sub-
  478.                  directories.
  479.  
  480.       Lost "x"         Procmail tried    to  clone  itself  but
  481.                  could    not  find  back    rcfile "x" (it
  482.                  either    got removed or it was a     rela-
  483.                  tive  path  and you changed directory
  484.                  since procmail    opened it last time).
  485.  
  486.       Missing closing brace     A nesting block was started, but nev-
  487.                  er finished.
  488.  
  489.       Missing name         The -f    option needs  an  extra     argu-
  490.                  ment.
  491.  
  492.       Missing argument     You specified the -a option but  for-
  493.                  got the argument.
  494.  
  495.       Missing rcfile     You specified the -m option, procmail
  496.                  expects  the name of an rcfile    as ar-
  497.                  gument.
  498.  
  499.       Missing recipient     You specified the -d option or    called
  500.                  procmail  under  a different name, it
  501.                  expects one or    more recipients    as ar-
  502.                  guments.
  503.  
  504.       No space left    to finish writing "x"
  505.                  The filesystem     containing  "x"  does
  506.                  not  have enough free space to    permit
  507.                  delivery of the message to the    file.
  508.  
  509.       Out of memory         The system is out of swap space  (and
  510.                  NORESRETRY has    been exhausted).
  511.  
  512.       Processing continued     The unrecognised options on the  com-
  513.                  mand  line are    ignored, proceeding as
  514.                  usual.
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.      Page 8                         (printed 8/25/98)
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  534.  
  535.  
  536.  
  537.       Program failure (nnn)    of "x"
  538.                  Program that was started by  procmail
  539.                  returned  nnn instead of EXIT_SUCCESS
  540.                  (=0); if nnn is negative,  then  this
  541.                  is the    signal the program died    on.
  542.  
  543.       Renaming bogus "x" into "x"
  544.                  The system mailbox of    the  recipient
  545.                  was  found to be bogus, procmail per-
  546.                  formed    evasive    actions.
  547.  
  548.       Skipped: "x"         Couldn't do anything with "x" in  the
  549.                  rcfile    (syntax    error),    ignoring it.
  550.  
  551.       Suspicious rcfile "x"     The owner of the rcfile was  not  the
  552.                  recipient  or    root, or the directory
  553.                  that contained    it was world  writable
  554.                  (the rcfile was not used).
  555.  
  556.       Terminating prematurely whilst waiting for ...
  557.                  Procmail received a signal  while  it
  558.                  was waiting for ...
  559.  
  560.       Quota    exceeded while writing "x"
  561.                  The filesize quota for    the  recipient
  562.                  on the    filesystem containing "x" does
  563.                  not permit delivering the message  to
  564.                  the file.
  565.  
  566.       Timeout, terminating "x"
  567.                  Timeout has occurred  on  program  or
  568.                  filter    "x".
  569.  
  570.       Timeout, was waiting for "x"
  571.                  Timeout  has  occurred     on   program,
  572.                  filter    or file    "x".  If it was    a pro-
  573.                  gram or filter, then it  didn't  seem
  574.                  to be running anymore.
  575.  
  576.       Truncated file to former size
  577.                  The file could    not  be     delivered  to
  578.                  successfully,    so  the    file was trun-
  579.                  cated to its former size.
  580.  
  581.       Truncating "x" and retrying lock
  582.                  "x" does  not    seem  to  be  a     valid
  583.                  filename or the file is not empty.
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.      Page 9                         (printed 8/25/98)
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  600.  
  601.  
  602.  
  603.       Rescue of unfiltered data succeeded/failed
  604.                  A  filter  returned   unsuccessfully,
  605.                  procmail tried    to get back the    origi-
  606.                  nal text.
  607.  
  608.       Unexpected EOL     Missing closing quote,    or  trying  to
  609.                  escape    EOF.
  610.  
  611.       Unknown user "x"     The specified recipient does not have
  612.                  a corresponding uid.
  613.  
  614.      EEEEXXXXTTTTEEEENNNNDDDDEEEEDDDD DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  615.       Extended diagnostics can be turned on    and off     through  set-
  616.       ting the VERBOSE variable.
  617.  
  618.       [pid]    time & date     Procmail's pid    and a timestamp.  Gen-
  619.                  erated    whenever procmail logs a diag-
  620.                  nostic    and  at     least    a  second  has
  621.                  elapsed since the last    timestamp.
  622.  
  623.       Acquiring kernel-lock     Procmail now tries to kernel-lock the
  624.                  most  recently     opened    file (descrip-
  625.                  tor).
  626.  
  627.       Assigning "x"         Environment variable assignment.
  628.  
  629.       Assuming identity of the recipient, VERBOSE=off
  630.                  Dropping all privileges (if any), im-
  631.                  plicitly  turns off extended diagnos-
  632.                  tics.
  633.  
  634.       Bypassed locking "x"     The mail spool    directory was not  ac-
  635.                  cessible to procmail, it relied sole-
  636.                  ly on kernel locks.
  637.  
  638.       Executing "x"         Starting  program  "x".   If  it   is
  639.                  started by procmail directly (without
  640.                  an intermediate shell), procmail will
  641.                  show where it separated the arguments
  642.                  by inserting commas.
  643.  
  644.       HOST mismatched "x"     This host was called "x",  HOST  con-
  645.                  tained    something else.
  646.  
  647.       Locking "x"         Creating lockfile "x".
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.      Page 10                         (printed 8/25/98)
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  666.  
  667.  
  668.  
  669.       Linking to "x"     Creating a hardlink between directory
  670.                  folders.
  671.  
  672.       Match    on "x"         Condition matched.
  673.  
  674.       Matched "x"         Assigned "x" to MMMMAAAATTTTCCCCHHHH.
  675.  
  676.       No match on "x"     Condition   didn't   match,    recipe
  677.                  skipped.
  678.  
  679.       Notified comsat: "$LOGNAME@offset:file"
  680.                  Sent comsat/biff a notice  that  mail
  681.                  arrived for user $LOGNAME at `offset'
  682.                  in `file'.
  683.  
  684.       Opening "x"         Opening file "x" for appending.
  685.  
  686.       Rcfile: "x"         Rcfile    changed    to "x".
  687.  
  688.       Reiterating kernel-lock
  689.                  While    attempting   several   locking
  690.                  methods,  one of these    failed.     Proc-
  691.                  mail will reiterate  until  they  all
  692.                  succeed in rapid succession.
  693.  
  694.       Score: added newtotal    "x"
  695.                  This condition    scored `added' points,
  696.                  which resulted    in a `newtotal'    score.
  697.  
  698.       Unlocking "x"         Removing lockfile "x" again.
  699.  
  700.      WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS
  701.       You should create a shell script that    uses  lllloooocccckkkkffffiiiilllleeee(1)  be-
  702.       fore invoking    your mail shell    on any mailbox file other than
  703.       the system mailbox (unless of    course,    your mail  shell  uses
  704.       the  same  lockfiles (local or global) you specified in your
  705.       rcfile).
  706.  
  707.       In the unlikely event    that you absolutely need to kill proc-
  708.       mail    before    it has finished, first try and use the regular
  709.       kill command (i.e.  _n_o_t kill -9, see the subsection  _S_i_g_n_a_l_s
  710.       for suggestions), otherwise some _l_o_c_k_f_i_l_e_s might not get re-
  711.       moved.
  712.  
  713.       Beware when using the    ----tttt option, if procmail    repeatedly  is
  714.       unable  to  deliver  the  mail  (e.g.     due  to  an incorrect
  715.       rcfile), the system mailqueue    could fill up.    This could ag-
  716.       gravate both the local postmaster and    other users.
  717.  
  718.       The ////uuuussssrrrr////ffffrrrreeeeeeeewwwwaaaarrrreeee////lllliiiibbbb////pppprrrrooooccccmmmmaaaaiiiillll////pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc file might be exe-
  719.       cuted     with  root privileges,    so be very careful of what you
  720.       put in it.  SSSSHHHHEEEELLLLLLLL will be equal to that of the current reci-
  721.  
  722.  
  723.  
  724.      Page 11                         (printed 8/25/98)
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  732.  
  733.  
  734.  
  735.       pient,  so if    procmail has to    invoke the shell, you'd    better
  736.       set it to some safe value first.  See    also:  DDDDRRRROOOOPPPPPPPPRRRRIIIIVVVVSSSS.
  737.  
  738.       Keep in mind that if    cccchhhhoooowwwwnnnn(1)  is  permitted     on  files  in
  739.       ////uuuussssrrrr////ffffrrrreeeeeeeewwwwaaaarrrreeee////lllliiiibbbb////pppprrrrooooccccmmmmaaaaiiiillll////pppprrrrooooccccmmmmaaaaiiiillllrrrrccccssss////,  that  they    can be
  740.       chowned to root (or anyone else) by  their  current  owners.
  741.       For maximum security,    make sure this directory is _e_x_e_c_u_t_a_b_l_e
  742.       to root only.
  743.  
  744.      BBBBUUUUGGGGSSSS
  745.       After    removing a lockfile by force, procmail waits  $SUSPEND
  746.       seconds  before creating a new lockfile so that another pro-
  747.       cess that decides to remove the stale    lockfile will not  re-
  748.       move the newly created lock by mistake.
  749.  
  750.       Procmail uses    the regular TERMINATE signal to    terminate  any
  751.       runaway filter, but it does not check    if the filter responds
  752.       to that signal and it    only sends it to  the  filter  itself,
  753.       not to any of    the filter's children.
  754.  
  755.       A continued CCCCoooonnnntttteeeennnntttt----LLLLeeeennnnggggtttthhhh:::: field is not handled correctly.
  756.  
  757.      MMMMIIIISSSSCCCCEEEELLLLLLLLAAAANNNNEEEEOOOOUUUUSSSS
  758.       If there is an existing CCCCoooonnnntttteeeennnntttt----LLLLeeeennnnggggtttthhhh:::: field    in the    header
  759.       of  the  mail     and  the ----YYYY option is not specified, procmail
  760.       will trim the    field to report    the  correct  size.   Procmail
  761.       does not change the fieldwidth.
  762.  
  763.       If there is no CCCCoooonnnntttteeeennnntttt----LLLLeeeennnnggggtttthhhh:::: field or the  ----YYYY  option  has
  764.       been    specified and procmail appends to regular mailfolders,
  765.       any lines in the body    of the message that  look  like     post-
  766.       marks     are  prepended     with `>' (disarms bogus mailheaders).
  767.       The regular expression that is  used    to  search  for     these
  768.       postmarks is:
  769.            `\nFrom '
  770.  
  771.       If the destination name used in explicit  delivery  mode  is
  772.       not  in  /etc/passwd,     procmail  will    proceed    as if explicit
  773.       delivery mode     was  not  in  effect.     If  not  in  explicit
  774.       delivery  mode and should the    uid procmail is    running    under,
  775.       have no corresponding    /etc/passwd entry, then    HOME will  de-
  776.       fault     to /, LOGNAME will default to #uid and    SHELL will de-
  777.       fault    to /bin/sh.
  778.  
  779.       When in explicit delivery mode,  procmail  will  generate  a
  780.       leading  `From ' line    if none    is present.  If    one is already
  781.       present procmail will    leave it intact.  If procmail  is  not
  782.       invoked  with     one of    the following user or group ids: root,
  783.       daemon, uucp,    mail, x400, network,  list,  slist,  lists  or
  784.       news,     but  still  has  to  generate or accept a new `From '
  785.       line,    it will    generate an additional `>From '    line  to  help
  786.       distinguish fake mails.
  787.  
  788.  
  789.  
  790.      Page 12                         (printed 8/25/98)
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  798.  
  799.  
  800.  
  801.       For security reasons procmail    will only use an  absolute  or
  802.       $HOME-relative rcfile    if it is either    owned by the recipient
  803.       or root and not world    writable, or if    the  directory    it  is
  804.       contained in is not world writable.
  805.  
  806.       If /var/mail/$LOGNAME    is a bogus mailbox (i.e. does not  be-
  807.       long    to the recipient, is unwritable, is a symbolic link or
  808.       is a hard link), procmail will upon startup try to rename it
  809.       into    a  file    starting with `BOGUS.' and ending in an    inode-
  810.       sequence-code.  If this turns    out to be impossible,  OOOORRRRGGGGMMMMAAAAIIIILLLL
  811.       will    have _n_o    initial    value, and hence will inhibit delivery
  812.       without a proper rcfile.
  813.  
  814.       If /var/mail/$LOGNAME    already    is a valid  mailbox,  but  has
  815.       got too loose    permissions on it, procmail will correct this.
  816.       To prevent procmail from doing this make sure    the u+x    bit is
  817.       set.
  818.  
  819.       When delivering to directories (or to    MH folders) you     ddddoooonnnn''''tttt
  820.       need    to  use    lockfiles to prevent several concurrently run-
  821.       ning procmail    programs from messing up.
  822.  
  823.       Delivering to    MH folders is  slightly     more  time  consuming
  824.       than    delivering to normal directories or mailboxes, because
  825.       procmail has to search for the next  available  number  (in-
  826.       stead    of having the filename immediately available).
  827.  
  828.       On general failure procmail will return EX_CANTCREAT,    unless
  829.       option  ----tttt  is  specified,  in  which     case  it  will    return
  830.       EX_TEMPFAIL.
  831.  
  832.       To make `egrepping' of  headers  more     consistent,  procmail
  833.       concatenates all continued header fields; but    only internal-
  834.       ly.  When delivering the mail, line breaks  will  appear  as
  835.       before.
  836.  
  837.       If procmail is called    under a    name not starting with    `proc-
  838.       mail'     (e.g.    if it is linked    to another name    and invoked as
  839.       such), it comes up in    explicit delivery  mode,  and  expects
  840.       the  recipients'  names  as command line arguments (as if -d
  841.       had been specified).
  842.  
  843.       Comsat/biff notifications are    done using udp.     They are sent
  844.       off  once when procmail generates the    regular    logfile    entry.
  845.       The notification messages have the following extended    format
  846.       (or as close as you can get when final delivery was not to a
  847.       file):
  848.            $LOGNAME@offset_of_message_in_mailbox:absolute_path_to_mailbox
  849.  
  850.       Whenever procmail itself opens a file    to deliver to, it con-
  851.       sistently  uses  the    following  kernel  locking strategies:
  852.       ffffccccnnnnttttllll(2), lllloooocccckkkkffff(3) and fffflllloooocccckkkk(2).
  853.  
  854.  
  855.  
  856.      Page 13                         (printed 8/25/98)
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  864.  
  865.  
  866.  
  867.       Procmail is NFS-resistant and    eight-bit clean.
  868.  
  869.      NNNNOOOOTTTTEEEESSSS
  870.       Calling up procmail with the -h or -?    options    will cause  it
  871.       to  display  a  command-line    help  and  recipe  flag    quick-
  872.       reference page.
  873.  
  874.       There    exists an excellent newbie FAQ about mailfilters  (and
  875.       procmail  in    particular),  it  is being maintained by Nancy
  876.       McGough <nancym@ii.com> and can be  obtained    by  sending  a
  877.       mail    to  mail-server@rtfm.mit.edu with the following    in the
  878.       body:
  879.            send usenet/news.answers/mail/filtering-faq
  880.  
  881.       If procmail is _n_o_t installed globally    as  the     default  mail
  882.       delivery  agent (ask your system administrator), you have to
  883.       make sure it is invoked when your  mail  arrives.   In  this
  884.       case    your  $HOME/.forward (beware, it hhhhaaaassss to    be world read-
  885.       able)    file should contain the    line below.  Be     sure  to  in-
  886.       clude     the single and    double quotes, and it _m_u_s_t be an _a_b_s_o_-
  887.       _l_u_t_e path.  The ####_Y_O_U_R__U_S_E_R_N_A_M_E is not    actually  a  parameter
  888.       that    is required by procmail, in fact, it will be discarded
  889.       by sh    before procmail    ever sees it; it is however  a    neces-
  890.       sary kludge against overoptimising sendmail programs:
  891.  
  892.       "|IFS=' '&&p=/usr/freeware/bin/procmail&&test    -f $p&&exec $p -Yf-||exit 75 ####_Y_O_U_R__U_S_E_R_N_A_M_E"
  893.  
  894.       Procmail can also  be     invoked  to  postprocess  an  already
  895.       filled system    mailbox.  This can be useful if    you don't want
  896.       to or    can't use a $HOME/.forward file     (in  which  case  the
  897.       following  script  could  periodically be called from    within
  898.       ccccrrrroooonnnn(1), or whenever you start reading mail):
  899.  
  900.            #!/bin/sh
  901.  
  902.            ORGMAIL=/var/mail/$LOGNAME
  903.  
  904.            if cd $HOME &&
  905.         test -s    $ORGMAIL &&
  906.         lockfile -r0 -l1024 .newmail.lock 2>/dev/null
  907.            then
  908.          trap "rm -f .newmail.lock" 1 2    3 13 15
  909.          umask 077
  910.          lockfile -l1024 -ml
  911.          cat $ORGMAIL >>.newmail &&
  912.           cat /dev/null    >$ORGMAIL
  913.          lockfile -mu
  914.          formail -s procmail <.newmail &&
  915.           rm -f    .newmail
  916.          rm -f .newmail.lock
  917.            fi
  918.            exit 0
  919.  
  920.  
  921.  
  922.      Page 14                         (printed 8/25/98)
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.      PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))       BBBBuuuuGGGGlllleeeessssssss ((((1111999999997777////00004444////11111111))))           PPPPRRRROOOOCCCCMMMMAAAAIIIILLLL((((1111))))
  930.  
  931.  
  932.  
  933.     AAAA ssssaaaammmmpppplllleeee ssssmmmmaaaallllllll $$$$HHHHOOOOMMMMEEEE////....pppprrrrooooccccmmmmaaaaiiiillllrrrrcccc::::
  934.       PATH=/bin:/usr/bin:/usr/freeware/bin
  935.       MAILDIR=$HOME/Mail      #you'd better    make sure it exists
  936.       DEFAULT=$MAILDIR/mbox      #completely optional
  937.       LOGFILE=$MAILDIR/from      #recommended
  938.  
  939.       :0:
  940.       * ^From.*berg
  941.       from_me
  942.  
  943.       :0
  944.       * ^Subject:.*Flame
  945.       /dev/null
  946.  
  947.       Other    examples for rcfile recipes can    be looked  up  in  the
  948.       pppprrrrooooccccmmmmaaaaiiiilllleeeexxxx(5)    man page.
  949.  
  950.      SSSSOOOOUUUURRRRCCCCEEEE
  951.       This program is part of the _p_r_o_c_m_a_i_l _m_a_i_l-_p_r_o_c_e_s_s_i_n_g-_p_a_c_k_a_g_e
  952.       (v3.11pre7  1997/04/28)  available  at  your    nearest    USENET
  953.       comp.sources.misc  archive,    or   at      ftp.informatik.rwth-
  954.       aachen.de as ppppuuuubbbb////ppppaaaacccckkkkaaaaggggeeeessss////pppprrrrooooccccmmmmaaaaiiiillll////pppprrrrooooccccmmmmaaaaiiiillll....ttttaaaarrrr....ggggzzzz.
  955.  
  956.      MMMMAAAAIIIILLLLIIIINNNNGGGGLLLLIIIISSSSTTTT
  957.       There    exists a mailinglist for  questions  relating  to  any
  958.       program in the procmail package:
  959.            <procmail@informatik.rwth-aachen.de>
  960.             for    submitting questions/answers.
  961.            <procmail-request@informatik.rwth-aachen.de>
  962.             for    subscription requests.
  963.  
  964.       If you would like to stay informed about  new     versions  and
  965.       official patches send    a subscription request to
  966.            procmail-announce-request@informatik.rwth-aachen.de
  967.       (this    is a readonly list).
  968.  
  969.      AAAAUUUUTTTTHHHHOOOORRRR
  970.       Stephen R. van den Berg
  971.            <srb@cuci.nl>
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.      Page 15                         (printed 8/25/98)
  989.  
  990.  
  991.  
  992.